<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
  <input type="hidden" id="currentPage" value="${pager.pageParameter.currentPage}"/>

<c:if test="${pager.pageParameter.totalPage>1}">
<div class="pagin">
    <div class="message" >共<i class="blue">${pager.pageParameter.totalCount}</i>条记录&nbsp;&nbsp;<i class="blue">${pager.pageParameter.currentPage }/${pager.pageParameter.totalPage }</i></div>
    <ul class="paginList">
      <li class="paginItem"><a  <c:if test="${pager.pageParameter.currentPage!=1}">href="javascript:baseSearchQuery(1);"</c:if> >首页</a></li>
      <li class="paginItem"><a  <c:if test="${pager.pageParameter.currentPage > 1}">href="javascript:baseSearchQuery('${pager.pageParameter.currentPage-1}');"</c:if>>上一页</a></li>
      <li class="paginItem"><a  <c:if test="${pager.pageParameter.totalPage > pager.pageParameter.currentPage}">href="javascript:baseSearchQuery('${pager.pageParameter.currentPage+1}');"</c:if>>下一页</a></li>
      <li class="paginItem"><a  <c:if test="${pager.pageParameter.totalPage > pager.pageParameter.currentPage}">href="javascript:baseSearchQuery('${pager.pageParameter.totalPage}');"</c:if>>尾页</a></li>
      <li class="paginItem">
	        <select id="selPage" style="margin-top:7px;" onchange="toPage();">
	          <c:forEach var="i" step="1" begin="1" end="${pager.pageParameter.totalPage}" varStatus="status">
	          	<option value="${status.index}">第${status.index}页</option>
	          </c:forEach>
	        </select> 
      </li>
    </ul>
  </div>
</c:if>
  <script>
  	 $("#selPage").val("${pager.pageParameter.currentPage}");
  	 function toPage(){
  	 	var pageNum=$("#selPage option:selected").val();
  	 	baseSearchQuery(pageNum);
  	 }
  </script>